//
//  NSObject+SY.h
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/5/2.
//  Copyright © 2019年 SanYi. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (SY)

/**
 字典转换成json字符串

 @param dict 字典
 @return json字符串
 */
-(NSString *)convertToJsonData:(NSDictionary *)dict;

/**
 data转换成字典

 @param jsonData data
 @return 返回数据
 */
- (NSDictionary *)convertJsonStringToNSData:(NSData *)jsonData;


/**
 字符串转换成字典

 @param jsonStr 字符串
 @return 返回
 */
- (NSDictionary *)convertJsonString:(NSString *)jsonStr;


/**
 验证密码
 
 @param password 密码
 @return 1
 */
+ (BOOL)checkPassword:(NSString *) password;


/**
 *  延迟时间执行
 */
+ (void)executeRunloop:(void(^)())runloop afterDelay:(float)delay;
//保存数据
void SaveDataToNSUserDefaults(id data, NSString *key);
//得到数据
id GetDataFromNSUserDefaults(NSString *key);
//删除所在的key的数据
void DeleteDataFromNSUserDefaults(NSString * key);


+ (NSDate *)dateFormatter:(NSString *)time;
//日期对比
+ (int)compareOneDay:(NSDate *)currentDay withAnotherDay:(NSDate *)BaseDay;


/**
 获取到白板数组，然后组织数据

 @param bbzArr 1
 @return 1
 */
+ (NSMutableArray *)baibanZuArr:(NSArray *)bbzArr boardArrId:(NSArray *)boardArr;

@end
